import React from 'react'
import './SidebarCss/sidebar.scss'
import { TopList, CenterList, FooterList } from '@/stoer/index'

function Sidebar() {



    function Xuan(data) {
        return data.map((item, index) => {
            return <div id={item.title == '精选推荐' ? 'JingXuan' : ''} key={index} className='main-aside-item'>
                <img src={item.img} alt="" />
                <div>{item.title}</div>
            </div>
        })
    }

    return (
        <div className='mall-aside-wrapper'>
            {
                Xuan(TopList)
            }

            <p className='aside-left-p'>创意设计</p>

            {
                Xuan(CenterList)
            }

            <p className='aside-left-p'>其他</p>

            {
                Xuan(FooterList)
            }
        </div>
    )
}

export default Sidebar
